<template>
  <div>
    <el-dialog title="批量操作" :visible.sync="dialogVisible" width="500px" :before-close="closeEditDialog"
      :close-on-click-modal="false" :modal-append-to-body="false">
      <!-- <el-form :model="batchInfo" :rules="rules" ref="refBatchInfo" label-width="100px">
        <el-form-item size="small" label="企业名称" prop="companyName">
          <el-input clearable v-model="batchInfo.companyName"></el-input>
        </el-form-item>
        <el-form-item size="small" label="详细地址" prop="address">
          <el-input type="textarea" :rows="2" placeholder="请输入详细地址" v-model="batchInfo.address"></el-input>
        </el-form-item>
        <el-form-item size="small" label="企业描述" prop="detail">
          <el-input type="textarea" :rows="2" placeholder="企业描述" v-model="batchInfo.detail"></el-input>
        </el-form-item>
      </el-form> -->
      <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="closeEditDialog" class="cancel-button">取 消</el-button>
        <el-button size="small"  @click="editSubmit" class="confirm-button">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    name: "batch",
    data() {
      return {
        dialogVisible: false,
        batchInfo: {},
        // 表单验证规则
        rules: {
          companyName: [{
              required: true,
              message: "请输入企业名称",
              trigger: "blur"
            },
            {
              min: 1,
              max: 20,
              message: "长度在 1 到 20 个字符",
              trigger: "blur",
            },
          ]
        },
      };
    },
    methods: {
      // 点击修改
      editSubmit() {
        // this.$refs.refBatchInfo.validate(async (valid) => {
        //   if (valid) {
        //     // const res = await reqEditEnterprise({
        //     //   id: this.batchInfo.id,
        //     //   companyName: this.batchInfo.companyName,
        //     //   province: this.select.province,
        //     //   city: this.select.city,
        //     //   area: this.select.area,
        //     //   address: this.batchInfo.address,
        //     //   detail: this.batchInfo.detail,
        //     // });
        //     // if (res.code !== 20000) return this.$modal.notifyWarning(res.message);
        //     // this.$modal.notifySuccess("编辑企业信息成功");
        //     // this.dialogVisible = false;
        //     // this.$parent.getEnterpriseList(); //更新企业列表
        //   }
        // });
      },
      // 点击关闭弹框
      closeEditDialog() {
        // this.$refs.refBatchInfo.resetFields();
        // this.selectedProvinceCityArea = [];
        this.dialogVisible = false;
      },
    },
  };
</script>

<style lang="less" scoped>
  @import url("../../common.less");
</style>